﻿@model LetLord.Models.Tenant

<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h4 id="myModalLabel">@Model.FirstName @Model.LastName</h4>
</div>
<div class="modal-body">
    <ul class="nav nav-tabs">
        <li class="active"><a href="#overview" data-toggle="tab">Overview</a></li>
        <li><a href="#references" data-toggle="tab">References</a></li>
        <li><a href="#tgm" data-toggle="tab">Group members</a></li>
    </ul>
</div>
<div class="tab-content">
    <div class="tab-pane active" id="overview">
        <div class="row-fluid">
            <table class="table table-striped">
                <tr>
                    <td>@Html.Bootstrap().LabelFor(x => x.FirstName).ShowRequiredStar(false).HtmlAttributes(new { @style = "font-weight: bold; font-size: 14px" })@Model.FirstName</td>
                    <td>@Html.Bootstrap().LabelFor(x => x.LastName).ShowRequiredStar(false).HtmlAttributes(new { @style = "font-weight: bold; font-size: 14px" })@Model.LastName</td>
                    <td>@Html.Bootstrap().LabelFor(x => x.TenantAge).ShowRequiredStar(false).HtmlAttributes(new { @style = "font-weight: bold; font-size: 14px" })@Model.TenantAge</td>
                    <td>@Html.Bootstrap().LabelFor(x => x.Email).ShowRequiredStar(false).HtmlAttributes(new { @style = "font-weight: bold; font-size: 14px" })@Model.Email</td>
                    <td>@Html.Bootstrap().LabelFor(x => x.DesiredPropertyLocation).ShowRequiredStar(false).HtmlAttributes(new { @style = "font-weight: bold; font-size: 14px" })@Model.DesiredPropertyLocation</td>
                </tr>
            </table>
            <div class="row-fluid">
                <div class="span6">
                    <p>
                        @Html.LabelFor(x => x.IsProfessional, new { @class = "profile-info-heading" })&nbsp
            @if (Model.IsProfessional == true)
            {
                <text> Yes</text>
            }
            else
            {
                <text> No</text>
            }
                    </p>
                    <p>
                        @Html.LabelFor(x => x.IsStudent, new { @class = "profile-info-heading" })&nbsp
            @if (Model.IsStudent == true)
            {
                <text> Yes</text>
            }
            else
            {
                <text> No</text>
            }
                    </p>
                    <p>
                        @Html.LabelFor(x => x.HasChildren, new { @class = "profile-info-heading" })&nbsp
            @if (Model.HasChildren == true)
            {
                <text> Yes</text>
            }
            else
            {
                <text> No</text>
            }
                    </p>
                </div>
                <div class="span6">
                    <p>
                        @Html.LabelFor(x => x.HasRentAllowance, new { @class = "profile-info-heading" })&nbsp
            @if (Model.HasRentAllowance == true)
            {
                <text> Yes</text>
            }
            else
            {
                <text> No</text>
            }
                    </p>
                    <p>
                        @Html.LabelFor(x => x.IsInGroup, new { @class = "profile-info-heading" })&nbsp
            @if (Model.IsInGroup == true)
            {
                <text> Yes</text>
            }
            else
            {
                <text> No</text>
            }
                    </p>
                    <p>
                        @Html.LabelFor(x => x.HasPets, new { @class = "profile-info-heading" })&nbsp
            @if (Model.HasPets == true)
            {
                <text> Yes</text>
            }
            else
            {
                <text> No</text>
            }
                    </p>
                </div>
            </div>
        </div>
    </div>
    <div class="tab-pane" id="references">
        @foreach (var photo in Model.ReferencePhotos)
        {
            <img src="@Url.Action("GetReference", "Tenants", new { id = photo.ImageId })" alt="@photo.Name") />
        }
    </div>
    <div class="tab-pane" id="tgm">
        @foreach (var tgm in Model.TenantGroupMembers)
        {
            <div class="row-fluid span6 offset1"><h4>@tgm.TenantGroupMemberName<text>, </text>@tgm.TenantGroupMemberAge</h4></div><hr />
        }
    </div>
</div>
<div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
